Currently we "only" grab the keyboard when starting a drag operation,
which does not impede keybindings to be processed. This is at best
not harmful (like workspace switching), but may have unintended effects
otherwise - for instance, the hot corner is disabled, so having the
corresponding keyboard shortcut still active is fairly odd (not to
mention that it leaves the system in a confused state).
Fix this by switching to pushModal()/popModal(), which will push a
dedicated keybinding mode for us.
https://bugzilla.gnome.org/show_bug.cgi?id=700877
_grabEvents: function() {
if (!this._eventsGrabbed) {
- Clutter.grab_pointer(_getEventHandlerActor());
- Clutter.grab_keyboard(_getEventHandlerActor());
- this._eventsGrabbed = true;
+ this._eventsGrabbed = Main.pushModal(_getEventHandlerActor());
+ if (this._eventsGrabbed)
+ Clutter.grab_pointer(_getEventHandlerActor());
}
},
_ungrabEvents: function() {
if (this._eventsGrabbed) {
Clutter.ungrab_pointer();
- Clutter.ungrab_keyboard();
+ Main.popModal(_getEventHandlerActor());
this._eventsGrabbed = false;
}
},